#!/bin/bash


#kafka压缩文件名
kafka_file_name=$(ls ./ | grep kafka_.*tgz)
#kafka解压后文件名(截取字符串)
kafka_dir=${kafka_file_name%%.tgz}
echo "------------------------开始关闭kafka集群------------------------"
sh ./${kafka_dir}/bin/kafka-server-stop.sh ./${kafka_dir}/config/server1.properties
sh ./${kafka_dir}/bin/kafka-server-stop.sh ./${kafka_dir}/config/server2.properties
sh ./${kafka_dir}/bin/kafka-server-stop.sh ./${kafka_dir}/config/server3.properties
echo "------------------------结束关闭kafka集群------------------------"